<template>
    <div>
        <h1>我是首页</h1>
        <button @click='goUser'>去用户页</button>
        <button @click="goNews">去新闻页</button>
    </div>
</template>

<script>
export default {
    methods:{
        goUser(){
            this.$router.push('/user')
        },
        goNews(){
            this.$router.push('/news')
        }
    }
}
</script>

<style>

</style>
